﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace MineMES.EntityFrameworkCore.Migrations
{
    public partial class firstmigration : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Accounts",
                columns: table => new
                {
                    Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    AccountCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AccountName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AccountNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AccountSex = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AccountRoleId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateUserNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateUserNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Ts = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Item1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Item2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Item3 = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Item4 = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Item5 = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Accounts", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Sys_User",
                columns: table => new
                {
                    Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
                    UserNo = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    UserName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    DependDepartNo = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    Password = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    Key = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Address = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateUserNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateUserNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateUserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Ts = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Item1 = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Item2 = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Item3 = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Item4 = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Item5 = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sys_User", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Accounts");

            migrationBuilder.DropTable(
                name: "Sys_User");
        }
    }
}
